package com.jly.service.impl;

import com.jly.anno.LogMonitor;
import com.jly.service.RadarService;
import com.jly.vos.ApiResult;
import com.jly.vos.GuidanceDataVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author Liwenhao
 * @date 2022/3/24 10:21
 * @description
 */
@Service
@Slf4j
public class RadarServiceImpl implements RadarService {

    @Override
    public ApiResult detect(String id) {
        return ApiResult.success("探测"+id);
    }

    @Override
    @LogMonitor
    public ApiResult guide(GuidanceDataVo guidanceDataVo) {
        log.info("[制导成功]" + guidanceDataVo.toString());
        GuidanceDataVo guidanceDataVo1 = new GuidanceDataVo();
        guidanceDataVo1.setId(1L)
            .setDestinationLatitude(12.5)
            .setDestinationLongitude(44.2)
            .setSpeed(500.234);
        return ApiResult.success(guidanceDataVo);
    }
}
